package com.qzimp.fujiancuo.mapper;

import com.mybatisflex.core.BaseMapper;
import com.qzimp.fujiancuo.entity.Event;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 *  映射层。
 *
 * @author 吴宗波
 * @since 2024-11-21
 */
@Mapper
public interface EventMapper extends BaseMapper<Event> {
    Event getEventWithDetails(@Param("id") Integer id);
    @Insert("INSERT INTO tb_event (name, happen_time, description, cuo_id) VALUES (#{event.name}, #{event.happenTime}, #{event.description}, #{event.cuoId})")
    int insertEvent(@Param("event") Event event);
}
